<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@page import="util.PageList"%>
<%@page import="system.bean.Member"%>
<%@page import="system.bean.ModuleFile"%>
<%@page import="offer.system.GetMemberSource"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
PageList pageBean = (PageList)request.getAttribute("pageBean");
ArrayList<ModuleFile> fileList = null;
if(null != request.getAttribute("fileList")){
	fileList = (ArrayList<ModuleFile>)request.getAttribute("fileList");
}

%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>已归档文件管理</title>
	<meta http-equiv="Pragma" content="no-cache" />
    <meta http-equiv="Cache-Control" content="no-cache" />
    <meta http-equiv="Expires" content="0" />
	<link rel="stylesheet" type="text/css" href="<%=basePath%>/css/index.css" />
	<link rel="stylesheet" type="text/css" href="<%=basePath%>/css/items.css" />
	<link rel="stylesheet" type="text/css" href="<%=basePath%>/css/subItems.css" />
    <script type="text/javascript"  src="<%=basePath%>js/getElementPos.js"></script>
    <script type="text/javascript"  src="<%=basePath%>js/coverLayer.js"></script>
    <script type="text/javascript"  src="<%=basePath%>js/files.js"></script>
    <script type="text/javascript"  src="<%=basePath%>jstree-v.pre1.0/_lib/jquery.js"></script>
    <script type="text/javascript"  src="<%=basePath%>js/StringUtil.js"></script>
  </head>
<body>
   <div class="itemTitle">
        文档查找
   </div>
   <form id="searchMemberForm"  action = "FilesManagerServlet"   method="get">
   <div class="ListItem">
	   	<span class="textSpan" style="width:180px;"> 请输入模型名称：</span>
	 	<input class="inputText" style=" height:18px;"  id="search_key" name="search_key" /> 
	 	<input type="submit" name="Submit" value="查找" onclick="" /> 
	 	<input type="submit" name="Submit" value="清除查询" onclick="" /> 
   </div>
   </form>
   <div class="itemTitle">
        文件列表
   </div>
  <table align="center" cellspacing="0" cellpadding="0" border="0" width="99%" >
	 <tr>
	    <td width="3%" class="listTable_headTr">&nbsp;</td>
	 	<td width="10%" class="listTable_headTr">序列号</td>
	 	<td width="25%" class="listTable_headTr">文件名</td>
	 	<td width="10%" class="listTable_headTr">创建人</td>
	 	<td width="6%" class="listTable_headTr">可包含</td>
	 	<td width="15%" class="listTable_headTr">归档时间</td>
	 	<td width="20%" class="listTable_headTr">操作</td>
	 </tr>
	 <% if ( null != fileList){
	 	ModuleFile file = null;
	 	Member member = null;
	    for(int i = 0 ; i < fileList.size() ; i++){
	    	file = (ModuleFile)fileList.get(i);
	    	member =GetMemberSource.getMemberById(file.getMemberId());
	     %>
	 <tr>
	   <td width="3%" class="listTable_tr"><input type="checkbox" value="<%=file.getFileId() %>" name="fileID"/></td>
	   <td width="10%" class="listTable_tr"><%=file.getSeqNo() %></td>
	   <td width="25%" class="listTable_tr"><%=file.getFileName()%></td>
	   <td width="10%" class="listTable_tr"><%=member.getReal_name() %><%=member.getEmpNo() %></td>
	   <td width="6%" class="listTable_tr">
	    <span id="isInclude_span_<%=file.getFileId() %>">
	   <% if(null != file.getBeInclude() && file.getBeInclude().equalsIgnoreCase("1")){ %>
	      是
	   <% }else{ %>
	   	 否
	   <% } %>
	   </span>
	   </td>
	   <td width="15%" class="listTable_tr"><%=file.getSignAuditTime() %></td>
	   <td width="20%" class="listTable_tr">
	   <% if(null == file.getBeInclude() || !file.getBeInclude().equalsIgnoreCase("1")){ %>
	     <span onclick="AddThisTopublic(<%=file.getFileId() %>,'isInclude_span_<%=file.getFileId() %>',this)" style="cursor:pointer;">
	     	<img  class="buttonBcImg" width="20" src="<%=basePath %>images/role_set.png" />设置为可被包含文档
	     </span>&nbsp;&nbsp;
	    <%} %>
	   </td>
	 </tr>
	 <%}
	   } %>
  </table>
    <% if(null != pageBean) {%>
    <div class="ListItem">
      <div  style="text-align:right;">
       <span id="opNoticeSpan" style="color:red;" ></span>
       <span class="textSpan">&nbsp;</span>
      <%= PageList.getnumpagelist("FilesManagerServlet","1=1",pageBean) %>
      </div>
    </div>
   <%} %>
  <div id="coverDiv" class="coverDiv"></div> <!-- 覆盖层，要放在所有弹出层之前 -->
 
</body>
</html>
